package com.example.handler;

import com.lly835.bestpay.enums.BestPayPlatformEnum;
import com.lly835.bestpay.model.PayResponse;
import org.springframework.stereotype.Service;


/***
 *
 * 微信支付
 */
@Service
public class SysPayWXHandler implements SysPayHandler {

    @Override
    public Boolean match(PayResponse payResponse) {
        return payResponse.getPayPlatformEnum() == BestPayPlatformEnum.WX;
    }

    @Override
    public String response(PayResponse payResponse) {
        return "<xml>\n" + "    <return_code><![CDATA[SUCCESS]]></return_code>\n" + "    <return_msg><![CDATA[OK]]></return_msg>\n" + "</xml>";
    }
}
